package com.example.spinning.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.spinning.bean.SemiProductQuality;


import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface SemiQualityMapper extends BaseMapper<SemiProductQuality> {

    //添加一条新的原料记录
    int addNewSemiQuality(SemiProductQuality semiProductQuality);

    //根据id删除原料记录
    int deleteSemiQualityById(@Param("ids") Long[] ids);

    //根据id查记录
    SemiProductQuality getSemiQualityById(Long id);

    //根据品名查记录
    List<SemiProductQuality> getSemiQualityByName(@Param("name") String name);
    //查指定品名的数量
    int getNameCount(@Param("name") String name);

    //修改
    int updateSemiQualityById(SemiProductQuality semiProductQuality);
    //查所有
    List<SemiProductQuality> getAll(@Param("start") Integer start, @Param("count") Integer count);
    //查总数量
    int getAllCount();

}
